#!/bin/bash

# 克隆 bt_api_py 仓库
echo "正在克隆 bt_api_py 仓库..."
git clone https://github.com/cloudQuant/bt_api_py

# 检查是否克隆成功
if [ -d "./bt_api_py" ]; then
    echo "bt_api_py 仓库克隆成功。"
else
    echo "错误：bt_api_py 仓库克隆失败。"
    exit 1
fi

# 安装依赖
echo "正在安装依赖..."
pip install -U -r ./bt_api_py/requirements.txt

# 检查依赖是否安装成功
if [ $? -eq 0 ]; then
    echo "依赖安装成功。"
else
    echo "错误：依赖安装失败。"
    exit 1
fi

echo "bt_api_py 安装完成。"